public class Operation {
    private double result;

    public double getResult() {
        return result;
    }

    public void setResult(double result) {
        this.result = result;
    }

    public double getResult(double numberA, double numberB) throws Exception {
        result=0;//定义一个值就是为了防止空指针异常
        return result;
    }
}
